Skip to content

Claude 4.6 after light instruction basically one shotted this, it wil…#599

Open
dadukhankevin wants to merge 1 commit intomainfrom
daniel/edit_history_ids
Open

Claude 4.6 after light instruction basically one shotted this, it wil…#599
dadukhankevin wants to merge 1 commit intomainfrom
daniel/edit_history_ids

Conversation

@dadukhankevin
Copy link
Contributor

…l be interesting...{

@dadukhankevin dadukhankevin linked an issue Feb 5, 2026 that may be closed by this pull request
@dadukhankevin dadukhankevin self-assigned this Feb 5, 2026
@dadukhankevin
Copy link
Contributor Author

The specific failure cases this fixes:

  1. Duplicate values in edit history — If a user types "hello", changes to "world", then changes back to "hello", the old .reverse().find(e => e.value
    === cell.value) would match the wrong edit (and its wrong validatedBy, wrong author, wrong timestamp). Now activeEditId points directly to the
    correct edit.
  2. Validation targeting the wrong edit — validateCellContent() used to scan backward for a value match. With duplicate values this could validate the
    wrong edit entry. Now it looks up by activeEditId first.
  3. Merge dedup correctness — During merges, ensureEditHistoryIds() stamps IDs on pre-migration data before dedup runs, so both branches produce
    consistent identifiers for the same edit.
  4. Webview isCurrentVersion highlighting — The edit history modal used the same fragile value-matching to highlight the "current" version. Now it
    uses entry.id === props.activeEditId.

What's still fragile (by design): Every ID lookup has a value-matching fallback for files that haven't been migrated yet or edge cases where
activeEditId is missing. Once the migration has run on a project, those fallbacks become dead code paths in practice.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

MEHGA

1 participant